package com.srwl.mytx.domain;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 订单收货信息
 */
public class OrderReceiveInfo implements Parcelable {
    String contact;
    String phone;
    String address;

    //默认构造函数必须有否则报错
    //   com.alibaba.fastjson.JSONException: default constructor not found. class com.mytx.pojo.OrderReceiveInfo
    public OrderReceiveInfo() {
    }

    public OrderReceiveInfo(String contact, String phone, String address) {
        this.contact = contact;
        this.phone = phone;
        this.address = address;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.contact);
        dest.writeString(this.phone);
        dest.writeString(this.address);
    }

    protected OrderReceiveInfo(Parcel in) {
        this.contact = in.readString();
        this.phone = in.readString();
        this.address = in.readString();
    }

    public static final Creator<OrderReceiveInfo> CREATOR = new Creator<OrderReceiveInfo>() {
        @Override
        public OrderReceiveInfo createFromParcel(Parcel source) {
            return new OrderReceiveInfo(source);
        }

        @Override
        public OrderReceiveInfo[] newArray(int size) {
            return new OrderReceiveInfo[size];
        }
    };
}
